1. Field of Invention
The invention relates to a motor driving circuit and, in particular, to a motor driving circuit with a motor failure detecting module.
2. Related Art
As shown in FIG. 1, a driving circuit 100 for controlling one coil of a stepping motor contains a detection resistor 140, a comparator 120, an AND gate 110, and a switch 150. The driving circuit 100 uses the detection resistor 140 to detect the current flowing through the motor coil 130 and converts it into a detection voltage Vd. The comparator 120 compares the detection voltage Vd with a reference voltage Vref and generates a comparison signal. When the detection voltage Vd is lower than the reference voltage Vref, the comparison signal is logical H. The AND gate 110 receives a control signal and the comparison signal and generates a driving control signal. The driving control signal controls the action of the switch 150, whereby controlling the power of the motor coil 130.
With reference to FIG. 2, FIG. 2(A) shows the control signal corresponding to a coil of a stepping motor, FIG. 2(B) shows the current in the motor coil 130, and FIG. 2(C) depicts the driving control signal. When the current signal of the motor coil is greater than a threshold Ith, the driving circuit 100 switches off the transistor switch 150 to cut the power supply of the motor coil 130. When the current signal of the motor coil is lower than the threshold Ith, the driving circuit 100 switches on the transistor switch 150 to supply power to the motor coil 130. Therefore, the driving circuit 100 produces a driving control signal shown in FIG. 2(C).
As the scanning speed of the scanner becomes faster, the rotation speed of its driving motor (stepping motor) also increases. In order to make the stepper rotating at high speed, one usually uses the motor acceleration/deceleration method to make the motor rotate according to a pull out curve. However, the high speed stepping motor is likely to fail due to faults in acceleration/deceleration curves or an inhomogeneous friction from the driving load. Usually, scanners use a home position detector to detect the motion of the motor. If the home position detector has no action after the motor moves a couple of steps, the motor must have failed. The drawbacks of this method are that a longer detection time is needed and that only failure in the direction toward the home position detector can be detected. Therefore, to make the stepping motor normally operate without interrupting the scanning, the motor driving circuit has to have the function of detecting motor failure. The controller of the scanner can immediately receive the information about motor failure, and restart the stepping motor by increasing or decreasing the rotation speed of the motor.
In view of the foregoing, an objective of the invention is to provide a motor driving circuit with the function of detecting motor failure.
Another objective of the invention is to provide a motor driving circuit that determines motor failure by detecting current changes of the motor.
The disclosed motor driving circuit contains a detection resistor, a comparator, an AND gate, and a failure detecting module. The detection resistor detects the current flowing through the motor and generates a detection voltage. The comparator compares a reference voltage with the detection voltage. The AND gate receives a motor control signal and a comparison signal and generates a motor driving signal to drive the motor. The failure detecting module detects whether the motor has failed according to the current variation in the motor.
In the disclosed motor driving circuit, the failure detecting module computes the first enable cycle time of the motor driving signal when the motor control signal is enabled. If the first enable cycle time is smaller than a threshold, then it means that the motor has failed.
The failure detecting module also computes the number of pulses in the motor driving signal when the motor control signal is enabled. If the number of pulses is greater than a threshold number of pulses, then the motor has failed.